package com.demo.consumer;

import com.demo.consumer.action.UserServiceAction;
import com.demo.consumer.config.ConsumerConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class ConsumerApplication {

    public static void main(String[] args) throws InterruptedException {
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
        ac.start();

        UserServiceAction bean = ac.getBean(UserServiceAction.class);
        while(true){
            Thread.sleep(20000L);
            bean.queryUsersRef();
        }

    }

}
